$(function () {
    $.ajax({
        // type: "method",
        url: "../json/Chocolates.json",
        success: function (result) {
            for (let i of result.data) {
                // console.log(i)
                $(".Chocolates").append(`
                <div class="grid-panel">
                    <img src="./image/${i.img}" alt="">
                    <div class="grid-item">
                    <div class="grid-panell">
                        <a href="">${i.name}</a>
                    </div>
                    <div class="">
                        <span>¥ </span>
                        <span>${i.pride}</span>
                    </div>
                    <div class="operate">
                        <a class="add-cart git">加入购物车</a>
                    </div>
                </div>
               
            </div>
                
                `)
            }
        }
    });
})